package org.lzy.shop.viewmodel.repository

import android.content.Context
import android.net.Uri
import org.lzy.shop.datas.FeedBackSubmitRequest
import org.lzy.shop.response.FeedBackItem
import org.lzy.shop.response.FeedbackType
import org.lzy.shop.response.OssUpload

interface FeedbackRepository {
    // 获取反馈类型
    suspend fun getFeedbackTypes(): MutableList<FeedbackType>?

    // 获取反馈列表
    suspend fun getFeedbackList(page: Int): MutableList<FeedBackItem>?

    // 获取文件上传凭证
    suspend fun getUploadCredentials(): OssUpload?

    // 上传单张图片
    suspend fun uploadImage(
        context: Context,
        imageUri: Uri,
        uploadUrl: String,
        tmpSecretId: String,
        tmpSecretKey: String,
        sessionToken: String
    ): String?

    // 上传多张图片
    suspend fun uploadImages(
        context: Context,
        imageUris: List<Uri>,
        uploadUrl: String,
        tmpSecretId: String,
        tmpSecretKey: String,
        sessionToken: String
    ): List<String>?

    // 提交反馈
    suspend fun submitFeedback(request: FeedBackSubmitRequest): Any?
}